package com.txc.cloud.admin.controller;

import com.txc.cloud.admin.service.IPermissionService;
import com.txc.common.global.result.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

/**
 * 权限 前端控制器
 *
 * @ClassName: PermissionController
 * @Author: TXC
 * @Date: 2023-08-15 17:05
 **/
@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Resource
    private IPermissionService permissionService;

    /**
     * 获取权限树
     */
    @GetMapping("/tree")
    public Result<?> getPermissionTree() {
        return Result.ok(permissionService.getPermissionTree());
    }
}
